import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';

// https://vite.dev/config/
export default defineConfig({
  base: "./",
  server: {
    host: "0.0.0.0",
    port: 4011,
  },
  build: {
    outDir: "dist",
  },
  plugins: [vue()],
  css: {
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler',
        silenceDeprecations: ['legacy-js-api']
      }
    }
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src/'),
      '@com': path.resolve(__dirname, './src/components/'),
    },
    extensions: ['.js', '.json'] // 使用路径别名时想要省略的后缀名，可以自己 增减
  },
})
